/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.transas.zorlog.data;

import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;

/**
 * Null implementation for DataSource interface.
 * Used instead of null ref.
 * @author amalikov
 */
public class NullDataSource extends DataSource {
	@Override
	public Object getHandle(String name) {
		return null;
	}

	@Override
	public double getValue(Object handle, int index) {
		return 0;
	}

	@Override
	public String getValueAsString(Object handle, int index, NumberFormat nf) {
		return "";
	}

	@Override
	public double[] getValues(String name) {
		return new double[0];
	}	
	
	@Override
	public int getSize() {
		return 0;
	}
	
	@Override
	public List<String> getNames() {
		return new ArrayList<>();
	}

	@Override
	public String getAttribute(Object handle, String attrName) {
		return "";
	}
}
